package com.bskj.common.enums;

public enum SweepCodeEnum {
	One_yard_sweep(1, "一码一扫"),
	Multi_scan(2, "一码多扫");
	

	private int key;
	private String value;

	private SweepCodeEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static SweepCodeEnum get(int key) {
		for(SweepCodeEnum sweepCodeEnum : SweepCodeEnum.values()) {
			if(sweepCodeEnum.getKey() == key) {
				return sweepCodeEnum;
			}
		}
		return null;
	}
}
